<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/8/20
 * Time: 16:05
 */

namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class RechargeRecord extends Model
{
    protected $table = 'recharge_record';
    use Common,SoftDeletes;
    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasOne
     * 用户
     */
    public function user()
    {
        return $this->hasOne(User::class, 'id', 'user_id');
    }
    /**
     * 公司
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function company()
    {
        return $this->belongsTo(Company::class, 'company_id', 'id');
    }
    const STATUS = [
        0=> '待支付',
        1=> '已支付',
    ];
    const TYPE = [
        0=> '余额充值',
        1=> '平台充值',
        2=> '余额支付',
        3=> '余额退款',
    ];

}